﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
 
    <!--==============================================Button配色======================================================-->
    <!--通用按钮-->
    <SolidColorBrush x:Key="Button_BgColor">#FFF1F1F1</SolidColorBrush>
    <SolidColorBrush x:Key="Button_MouseOver_FgColor">#FFF88C0D</SolidColorBrush>
    <SolidColorBrush x:Key="Button_MouseOver_BorderColor">#FFF88C0D</SolidColorBrush>
    <SolidColorBrush x:Key="Button_Pressed_FgColor">#FFDE7C09</SolidColorBrush>
    <SolidColorBrush x:Key="Button_Pressed_BorderColor">#FFDE7C09</SolidColorBrush>

    <!--最小化按钮-->
    <SolidColorBrush x:Key="MiniButton_MouseOver_FgColor">#FFFFFFFF</SolidColorBrush>
    <SolidColorBrush x:Key="MiniButton_MouseOver_BgColor">#FF3665B3</SolidColorBrush>
    <SolidColorBrush x:Key="MiniButton_Pressed_FgColor">#FFFFFFFF</SolidColorBrush>
    <SolidColorBrush x:Key="MiniButton_Pressed_BgColor">#FF3D6099</SolidColorBrush>

    <!--关闭按钮-->
    <SolidColorBrush x:Key="CloseButton_MouseOver_FgColor">#FFFFFFFF</SolidColorBrush>
    <SolidColorBrush x:Key="CloseButton_MouseOver_BgColor">#FFE04343</SolidColorBrush>
    <SolidColorBrush x:Key="CloseButton_Pressed_FgColor">#FFFFFFFF</SolidColorBrush>
    <SolidColorBrush x:Key="CloseButton_Pressed_BgColor">#FFDC0505</SolidColorBrush>

    <!--Button-->
    <Style x:Key="IconBtnStyle"  TargetType="{x:Type Button}">
        <Setter Property="FontSize" Value="15"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Foreground" Value="{DynamicResource FgColor}"/>
        <Setter Property="BorderBrush" Value="{DynamicResource BorderColor}"/>
        <Setter Property="Background" Value="{x:Null}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Border x:Name="border" CornerRadius="0" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <Grid x:Name="grid" Background="#009F1515">
                            <ContentPresenter x:Name="contentPresenter" 
                                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                              Margin="{TemplateBinding Padding}"
                                              RecognizesAccessKey="True" 
                                              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" 
                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                            </ContentPresenter>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsEnabled" Value="false">
                <Setter Property="Foreground" Value="{DynamicResource EnabledColor}"/>
                <Setter Property="BorderBrush" Value="{DynamicResource EnabledColor}"/>
            </Trigger>
            <Trigger Property="IsMouseOver"  Value="True">
                <Setter Property="Foreground" Value="{DynamicResource Button_MouseOver_FgColor}"/>
                <Setter Property="BorderBrush" Value="{DynamicResource Button_MouseOver_BorderColor}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Foreground" Value="{StaticResource Button_Pressed_FgColor}"/>
                <Setter Property="BorderBrush" Value="{StaticResource Button_Pressed_BorderColor}"/>
            </Trigger>
        </Style.Triggers>
    </Style>

    <!--Button-->
    <Style x:Key="BtnStyle" BasedOn="{StaticResource IconBtnStyle}" TargetType="{x:Type Button}">
        <Setter Property="Background" Value="{StaticResource Button_BgColor}"/>
    </Style>

     <Style x:Key="DeleteStyle" BasedOn="{StaticResource IconBtnStyle}" TargetType="{x:Type Button}"> 
        <Setter Property="Foreground" Value="Red"/>
        <Style.Triggers>
            <Trigger Property="IsMouseOver"  Value="True">
                <Setter Property="Foreground" Value="Red"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Foreground" Value="{StaticResource CloseButton_Pressed_BgColor}"/>
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="FunctionBtnStyle" BasedOn="{StaticResource IconBtnStyle}" TargetType="{x:Type Button}">
        <Setter Property="Foreground" Value="#FF54FF00"/>
        <Style.Triggers>
            <Trigger Property="IsMouseOver"  Value="True">
                <Setter Property="Foreground" Value="#FF54FF00"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Foreground" Value="#FF4BDC02"/>
            </Trigger>
        </Style.Triggers>
    </Style>


    <Style x:Key="CloseBtnStyle" BasedOn="{StaticResource IconBtnStyle}" TargetType="{x:Type Button}">
        <Setter Property="Background" Value="{StaticResource Button_BgColor}"/>
        <Style.Triggers>
            <Trigger Property="IsMouseOver"  Value="True">
                <Setter Property="Background" Value="{StaticResource CloseButton_MouseOver_BgColor}"/>
                <Setter Property="Foreground" Value="{StaticResource CloseButton_MouseOver_FgColor}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{StaticResource CloseButton_Pressed_BgColor}"/>
                <Setter Property="Foreground" Value="{StaticResource CloseButton_Pressed_FgColor}"/>
            </Trigger> 
        </Style.Triggers>
    </Style>
    <Style x:Key="MiniBtnStyle" BasedOn="{StaticResource IconBtnStyle}" TargetType="{x:Type Button}">
        <Setter Property="Background" Value="{StaticResource Button_BgColor}"/>
        <Style.Triggers>
            <Trigger Property="IsMouseOver"  Value="True">
                <Setter Property="Background" Value="{StaticResource MiniButton_MouseOver_BgColor}"/>
                <Setter Property="Foreground" Value="{StaticResource MiniButton_MouseOver_FgColor}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="True">
                <Setter Property="Background" Value="{StaticResource MiniButton_Pressed_BgColor}"/>
                <Setter Property="Foreground" Value="{StaticResource MiniButton_Pressed_FgColor}"/>
            </Trigger>
        </Style.Triggers>
    </Style> 
    
    
    
</ResourceDictionary>